import React from 'react';
import { Image,Alert } from 'antd';
import axios from 'axios';

class UploadPictures extends React.Component {
    state = {
        pictureUrl:[],
      }
    componentWillMount(){
        axios.get('/show')
        .then((response)=> {
            this.setState({
                pictureUrl:response.data
            })
    }).catch((error)=> {
        this.setState({
        })
        });
    }
    render() {

        return (
            <Image.PreviewGroup>
                {this.state.pictureUrl.map((item) => {return(<Image width={200} src={item.fileUrl} />)})}
            </Image.PreviewGroup>
        
        );
    }
}

export default UploadPictures;